#ifndef ROQUETTE_H
#define ROQUETTE_H

class Game;

#include "../GamePlay/map.h"
#include "../GamePlay/general.h"


class Roquette
{
    public:
    Roquette();
    ~Roquette();
    Roquette(int explosiona, std::string image, int degat);
    void contact();
    void deplacer(sf::Vector2f vent, Terrain *terre, Game *jeu, std::vector<sf::Sprite> unite);
    void afficherRoquette(sf::RenderWindow *app);
    void setRoquette(int explosion, std::string image, int degat);
    sf::Vector2f GetPosition();
    void tirer(float puissance, float angle, sf::Vector2f position, sf::Vector2f vent, bool flip);
    Roquette& operator=(const Roquette &roquette2);

    protected:
    float grav;
    float pi;
    sf::Texture *m_image, *m_explimage;
    sf::Sprite m_munition;
    sf::Vector2f m_position, vitesseinitial, positioninitial, positionexplode;
    sf::Sprite explosion[16];
    sf::SoundBuffer m_bufferexplosion;
    sf::Sound m_soundexplosion;
    float m_puissance;
    int m_degat;
    int m_explosion;
    float m_angle;
    float m_t;
    bool enTire, finTire, m_flip;
    int anim;
    sf::Clock clock;
    float time;
};

#endif // ROQUETTE_H
